public class TestDemo {
    //被public修饰的类，类名要与文件名相同
    public static void func1(int[] array){
        int left=0;
        int right=array.length-1;
        while (left<right){
            while (left<right&&array[left]%2!=0){
                left++;
            }
            while (left<right&&array[right]%2==0){
                right--;
            }
            swap(array, left, right);
        }
    }

    private static void swap(int[] array, int left, int right) {
        int tmp=left;
        left=right;
        right=tmp;

    }
}
